<!DOCTYPE html>
<html lang="en-US" dir="ltr">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>阿泽的笔记 | 阿泽的笔记</title>
    <meta name="description" content="做一个努力的码农">
    <link rel="preload stylesheet" href="/assets/style.47519a3e.css" as="style">
    
    <script type="module" src="/assets/app.130cc073.js"></script>
    <link rel="preload" href="/assets/inter-roman-latin.2ed14f66.woff2" as="font" type="font/woff2" crossorigin="">
    <link rel="modulepreload" href="/assets/chunks/framework.cc795e4d.js">
    <link rel="modulepreload" href="/assets/chunks/theme.3ebce9b1.js">
    <link rel="modulepreload" href="/assets/tools_linux命令.md.82c20701.lean.js">
    <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
    <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
  </head>
  <body>
    <div id="app"><div class="Layout" data-v-5a346dfe><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0f60ec36></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0f60ec36> Skip to content </a><!--]--><!----><header class="VPNav" data-v-5a346dfe data-v-ae24b3ad><div class="VPNavBar has-sidebar" data-v-ae24b3ad data-v-a0fd61f4><div class="container" data-v-a0fd61f4><div class="title" data-v-a0fd61f4><div class="VPNavBarTitle has-sidebar" data-v-a0fd61f4 data-v-86d1bed8><a class="title" href="/" data-v-86d1bed8><!--[--><!--]--><!----><!--[-->阿泽的笔记<!--]--><!--[--><!--]--></a></div></div><div class="content" data-v-a0fd61f4><div class="curtain" data-v-a0fd61f4></div><div class="content-body" data-v-a0fd61f4><!--[--><!--]--><div class="VPNavBarSearch search" data-v-a0fd61f4><!----></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-a0fd61f4 data-v-7f418b0f><span id="main-nav-aria-label" class="visually-hidden" data-v-7f418b0f>Main Navigation</span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>首页</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/case/" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>案例</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/tools/" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>工具</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-a0fd61f4 data-v-e6aabb21><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="toggle dark mode" aria-checked="false" data-v-e6aabb21 data-v-ce54a7d1 data-v-b1685198><span class="check" data-v-b1685198><span class="icon" data-v-b1685198><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-ce54a7d1><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="moon" data-v-ce54a7d1><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></div><!----><div class="VPFlyout VPNavBarExtra extra" data-v-a0fd61f4 data-v-40855f84 data-v-9c007e85><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-9c007e85><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="icon" data-v-9c007e85><circle cx="12" cy="12" r="2"></circle><circle cx="19" cy="12" r="2"></circle><circle cx="5" cy="12" r="2"></circle></svg></button><div class="menu" data-v-9c007e85><div class="VPMenu" data-v-9c007e85 data-v-e7ea1737><!----><!--[--><!--[--><!----><div class="group" data-v-40855f84><div class="item appearance" data-v-40855f84><p class="label" data-v-40855f84>Appearance</p><div class="appearance-action" data-v-40855f84><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="toggle dark mode" aria-checked="false" data-v-40855f84 data-v-ce54a7d1 data-v-b1685198><span class="check" data-v-b1685198><span class="icon" data-v-b1685198><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-ce54a7d1><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="moon" data-v-ce54a7d1><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></div></div></div><!----><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-a0fd61f4 data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><!----></header><div class="VPLocalNav reached-top" data-v-5a346dfe data-v-79c8c1df><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-79c8c1df><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="menu-icon" data-v-79c8c1df><path d="M17,11H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,11,17,11z"></path><path d="M21,7H3C2.4,7,2,6.6,2,6s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,7,21,7z"></path><path d="M21,15H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,15,21,15z"></path><path d="M17,19H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,19,17,19z"></path></svg><span class="menu-text" data-v-79c8c1df>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-79c8c1df data-v-1c15a60a><button data-v-1c15a60a>Return to top</button><!----></div></div><aside class="VPSidebar" data-v-5a346dfe data-v-b00e2fdd><div class="curtain" data-v-b00e2fdd></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-b00e2fdd><span class="visually-hidden" id="sidebar-aria-label" data-v-b00e2fdd> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="group" data-v-b00e2fdd><section class="VPSidebarItem level-0 collapsible has-active" data-v-b00e2fdd data-v-e31bd47b><div class="item" role="button" tabindex="0" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><h2 class="text" data-v-e31bd47b>工具</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-e31bd47b><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="caret-icon" data-v-e31bd47b><path d="M9,19c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l5.3-5.3L8.3,6.7c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4l-6,6C9.5,18.9,9.3,19,9,19z"></path></svg></div></div><div class="items" data-v-e31bd47b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/adb%E5%91%BD%E4%BB%A4.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>adb命令</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/arduino%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>arduino基础操作</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/cmd%20npm%20yarn%20pnpm%E5%91%BD%E4%BB%A4.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>cmd npm yarn pnpm命令</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/elementUi%E7%AC%94%E8%AE%B0.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>elementUi笔记</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/Emmet%20Web%E5%BF%AB%E9%80%9F%E6%9E%84%E5%BB%BA%E5%91%BD%E4%BB%A4.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>Emmet Web快速构建命令</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/git%E7%AC%94%E8%AE%B0.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>git笔记</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/js%E7%9F%A5%E8%AF%86%E7%82%B9.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>js知识点</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/linux%E5%91%BD%E4%BB%A4.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>linux命令</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/linux%E5%9F%9F%E5%90%8D%E9%85%8D%E7%BD%AE%E5%8F%8A%E5%8F%8D%E5%90%91%E4%BB%A3%E7%90%86.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>linux域名配置及反向代理</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/mac%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>mac使用笔记</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/mysql%E5%91%BD%E4%BB%A4.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>mysql命令</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/php%E5%9F%BA%E7%A1%80%E5%8F%8A%E5%B8%B8%E7%94%A8%E5%87%BD%E6%95%B0.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>php基础及常用函数</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/react.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>react</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/uniapp%E7%AC%94%E8%AE%B0.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>uniapp笔记</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/vue%E7%AC%94%E8%AE%B0.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>vue笔记</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/%E5%89%8D%E7%AB%AF%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>前端基础知识</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-b00e2fdd><section class="VPSidebarItem level-0 collapsible collapsed" data-v-b00e2fdd data-v-e31bd47b><div class="item" role="button" tabindex="0" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><h2 class="text" data-v-e31bd47b>案例</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-e31bd47b><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="caret-icon" data-v-e31bd47b><path d="M9,19c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l5.3-5.3L8.3,6.7c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4l-6,6C9.5,18.9,9.3,19,9,19z"></path></svg></div></div><div class="items" data-v-e31bd47b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/css%E6%8A%80%E5%B7%A7.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>css技巧</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/python%E8%87%AA%E5%8A%A8%E6%B5%8B%E8%AF%95%E8%84%9A%E6%9C%AC.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>python自动测试脚本</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/uniapp%E8%B8%A9%E5%9D%91%E8%AE%B0%E5%BD%95.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>uniapp踩坑记录</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/vuex%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>vuex使用示例</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/vue%E5%85%AD%E7%A7%8Dl%E4%BC%A0%E8%BE%93%E6%96%B9%E5%BC%8F.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>vue六种l传输方式</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/vue%E5%AE%9E%E4%BE%8B%E6%8A%80%E5%B7%A7.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>vue实例技巧</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/%E4%BC%98%E7%A7%80%E7%9A%84%E5%BC%80%E6%BA%90vue%E7%BB%84%E4%BB%B6.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>优秀的开源vue组件</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/%E5%89%8D%E7%AB%AF%E6%97%A5%E5%BF%97.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>前端日志</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/%E5%BC%80%E5%8F%91%E5%AF%8C%E6%96%87%E6%9C%AC%E6%9C%AC%E7%BC%96%E8%BE%91%E5%99%A8.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>开发富文本本编辑器</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/%E6%8F%92%E4%BB%B6%E4%BD%BF%E7%94%A8%E9%85%8D%E7%BD%AE.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>插件使用配置</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/%E6%A0%B7%E5%BC%8F%E5%B8%83%E5%B1%80.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>样式布局</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/%E8%BD%ACpdf%E7%9B%B8%E5%85%B3.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>转pdf相关</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-5a346dfe data-v-669faec9><div class="VPDoc has-sidebar has-aside" data-v-669faec9 data-v-6b87e69f><!--[--><!--]--><div class="container" data-v-6b87e69f><div class="aside" data-v-6b87e69f><div class="aside-curtain" data-v-6b87e69f></div><div class="aside-container" data-v-6b87e69f><div class="aside-content" data-v-6b87e69f><div class="VPDocAside" data-v-6b87e69f data-v-3f215769><!--[--><!--]--><!--[--><!--]--><div class="VPDocAsideOutline" role="navigation" data-v-3f215769 data-v-d330b1bb><div class="content" data-v-d330b1bb><div class="outline-marker" data-v-d330b1bb></div><div class="outline-title" role="heading" aria-level="2" data-v-d330b1bb>On this page</div><nav aria-labelledby="doc-outline-aria-label" data-v-d330b1bb><span class="visually-hidden" id="doc-outline-aria-label" data-v-d330b1bb> Table of Contents for current page </span><ul class="root" data-v-d330b1bb data-v-d0ee3533><!--[--><!--]--></ul></nav></div></div><!--[--><!--]--><div class="spacer" data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-6b87e69f><div class="content-container" data-v-6b87e69f><!--[--><!--]--><!----><main class="main" data-v-6b87e69f><div style="position:relative;" class="vp-doc _tools_linux%E5%91%BD%E4%BB%A4" data-v-6b87e69f><div><h2 id="用户类" tabindex="-1">用户类 <a class="header-anchor" href="#用户类" aria-label="Permalink to &quot;用户类&quot;">​</a></h2><div class="language-sh vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">   </span><span style="color:#B392F0;">1.增加用户</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">useradd</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">zuoshoupai</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">   </span><span style="color:#B392F0;">2.更改密码</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">passwd</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">zuoshoupai</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">        </span><span style="color:#B392F0;">\3.</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">删除用户</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">userdel</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">zhuzhu</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">   </span><span style="color:#B392F0;">3.切换用户</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">su</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">root</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"></span>
<span class="line"><span style="color:#24292E;">   </span><span style="color:#6F42C1;">1.增加用户</span><span style="color:#24292E;"> </span><span style="color:#032F62;">useradd</span><span style="color:#24292E;"> </span><span style="color:#032F62;">zuoshoupai</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">   </span><span style="color:#6F42C1;">2.更改密码</span><span style="color:#24292E;"> </span><span style="color:#032F62;">passwd</span><span style="color:#24292E;"> </span><span style="color:#032F62;">zuoshoupai</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">        </span><span style="color:#6F42C1;">\3.</span><span style="color:#24292E;"> </span><span style="color:#032F62;">删除用户</span><span style="color:#24292E;"> </span><span style="color:#032F62;">userdel</span><span style="color:#24292E;"> </span><span style="color:#032F62;">zhuzhu</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">   </span><span style="color:#6F42C1;">3.切换用户</span><span style="color:#24292E;"> </span><span style="color:#032F62;">su</span><span style="color:#24292E;"> </span><span style="color:#032F62;">root</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br></div></div><h3 id="给新用户root权限" tabindex="-1">给新用户root权限 <a class="header-anchor" href="#给新用户root权限" aria-label="Permalink to &quot;给新用户root权限&quot;">​</a></h3><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">方法一：修改 /etc/sudoers 文件，找到下面一行，把前面的注释（#）去掉</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">## Allows people in group wheel to run all commands  </span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">%wheel   ALL=(ALL)   ALL</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">然后修改用户，使其属于root组（wheel），命令如下：</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">$ usermod -g root tommy</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">修改完毕，现在可以用tommy帐号登录，然后用命令 su – ，即可获得root权限进行操作。</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">方法一：修改 /etc/sudoers 文件，找到下面一行，把前面的注释（#）去掉</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">## Allows people in group wheel to run all commands  </span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">%wheel   ALL=(ALL)   ALL</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">然后修改用户，使其属于root组（wheel），命令如下：</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">$ usermod -g root tommy</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">修改完毕，现在可以用tommy帐号登录，然后用命令 su – ，即可获得root权限进行操作。</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><h2 id="服务类" tabindex="-1">服务类 <a class="header-anchor" href="#服务类" aria-label="Permalink to &quot;服务类&quot;">​</a></h2><ul><li>cat /etc/redhat-release ：显示CentOS版本信息。</li></ul><ol><li>查看定时任务 crontab -l</li></ol><p>\2. 编辑定时任务(分时日月周) crontab -e 举例 */20 * * * * /usr/bin/php -f /var/www/html/duanxin/send_birthday.php</p><p>\3. 查看自启动列表 systemctl list-unit-files</p><p>\4. 查看历史记录并过滤 history |grep php</p><p>\5. 后台启动某进程 nohup /usr/bin/php/ /var/... **.php &gt; runoob.log 2&gt;&amp;1 &amp; () //不输入日志 &gt;/dev/null</p><p>\6. 停止某用户所有进程 killall -u alice</p><p>\6. 查看进程 g</p><p>\7. 查看系统版本 <code>cat /etc/redhat-release</code></p><p>\8. yum 安装本地包 yum localinstall mysql57-community-release-el7-11.noarch.rpm</p><p>\7. apahce/nginx启动命令：</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">//apache</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">  /usr/local/apache2/bin/apachectl restart 重启  </span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">service httpd restart 重新启动apache</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">/bin/systemctl start httpd.service   最新版本</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">systemctl stop httpd.service   停止</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">//nginx</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">    重启服务： service nginx restart</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">    快速停止或关闭Nginx：nginx -s stop</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">    正常停止或关闭Nginx：nginx -s quit</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">    配置文件修改重装载命令：nginx -s reload</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">     nginx平滑重启命令： kill -HUP 住进称号或进程号文件路径</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">     nginx 测试配置文件是否正确  nginx -t -c /usr/nginx/conf/nginx.conf</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">//apache</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">  /usr/local/apache2/bin/apachectl restart 重启  </span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">service httpd restart 重新启动apache</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">/bin/systemctl start httpd.service   最新版本</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">systemctl stop httpd.service   停止</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">//nginx</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">    重启服务： service nginx restart</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">    快速停止或关闭Nginx：nginx -s stop</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">    正常停止或关闭Nginx：nginx -s quit</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">    配置文件修改重装载命令：nginx -s reload</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">     nginx平滑重启命令： kill -HUP 住进称号或进程号文件路径</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">     nginx 测试配置文件是否正确  nginx -t -c /usr/nginx/conf/nginx.conf</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br></div></div><h2 id="yum命令" tabindex="-1">yum命令 <a class="header-anchor" href="#yum命令" aria-label="Permalink to &quot;yum命令&quot;">​</a></h2><p>\1. 安装yum包：$ yum install PACKAGE_NAME</p><p>\2. 取出yum包装： $ yum remove PACKAGE_NAME</p><p>\3. 重新安装一个yum包： $ yum reinstall PACKAGE_NAME</p><p>\4. 搜索yum包： $ yum search PACKAGE_NAME</p><p>\5. 显示yum包的信息： $ yum info PACKAGE_NAME</p><p>\6. 更新安装的yum包： $ yum update</p><p>\7. 更新具体的yum包： $ yum update PACKAGE_NAME</p><p>\8. 显示yum历史： $ yum history</p><p>\9. 显示已启用的yum存储库的列表： $ yum repolist</p><p>\10. 找出哪个yum包提供了一个特定的文件（例如：/usr/bin/nc)）： $ yum whatprovides &quot;*bin/nc&quot;</p><p>\11. 清除yum缓存： $ yum clean all</p><p>\12. 安装本地源 yum localinstall mysql57-community-release-el7-11.noarch.rpm</p><h2 id="网络类" tabindex="-1">网络类 <a class="header-anchor" href="#网络类" aria-label="Permalink to &quot;网络类&quot;">​</a></h2><p>8, 查看端口占用：</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;"> netstat -nplt </span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;"> netstat -lnp|grep 80</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;"> netstat -nplt </span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;"> netstat -lnp|grep 80</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>9, 查看公网ip</p><p><code>curl cip.cc </code>或 <code> curl ifconfig.me</code></p><p>9.2 查看肉网ip</p><p>​ <code> ip add</code></p><p>9.3 访问网络测试</p><p><code>curl -i http://192.168.9.152</code></p><p>\10. get/post请求</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">//get请求</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">curl &quot;http://www.baidu.com&quot;  如果这里的URL指向的是一个文件或者一幅图都可以直接下载到本地     </span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;"> curl -i &quot;http://www.baidu.com&quot;  显示全部信息      </span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;"> curl -l &quot;http://www.baidu.com&quot; 只显示头部信息</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">curl -v &quot;http://www.baidu.com&quot; 显示get请求全过程解析</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;"> wget &quot;http://www.baidu.com&quot;也可以</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">// post请求</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;"> curl -d &quot;param1=value1&amp;param2=value2&quot; &quot;http://www.baidu.com</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">//get请求</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">curl &quot;http://www.baidu.com&quot;  如果这里的URL指向的是一个文件或者一幅图都可以直接下载到本地     </span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;"> curl -i &quot;http://www.baidu.com&quot;  显示全部信息      </span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;"> curl -l &quot;http://www.baidu.com&quot; 只显示头部信息</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">curl -v &quot;http://www.baidu.com&quot; 显示get请求全过程解析</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;"> wget &quot;http://www.baidu.com&quot;也可以</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">// post请求</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;"> curl -d &quot;param1=value1&amp;param2=value2&quot; &quot;http://www.baidu.com</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br></div></div><p>\11. 查询公网ip <code> curl icanhazip.com</code></p><p>\12. 防火墙管理</p><p>查看状态</p><p>systemctl status firewalld</p><p>sudo systemctl stop firewalld</p><p>永久关闭</p><p>systemctl disable firewalld</p><p>开启80端口</p><p>[root@centos7 ~]# firewall-cmd --zone=public --add-port=80/tcp --permanent</p><p>重启防火墙：</p><p>[root@centos7 ~]# firewall-cmd --reload</p><p>查询有哪些端口是开启的:</p><p>[root@centos7 ~]# firewall-cmd --list-port</p><p>防火墙 自启动</p><p>systemctl enable firewalld</p><h2 id="监测类" tabindex="-1"><a id="stat"> 监测类</a> <a class="header-anchor" href="#监测类" aria-label="Permalink to &quot;&lt;a id=&quot;stat&quot;&gt; 监测类&lt;/a&gt;&quot;">​</a></h2><p>查看内存使用情况</p><p>​ free -m</p><p>查看cpu使用情况</p><p>top //查看进程运行情况</p><p>查看磁盘以及分区情况</p><p>df -h</p><p>查看网络情况</p><p>ifconfig</p><p>查看端口使用情况</p><p>​ #1.方法一</p><p>​ lsof -i:端口号</p><p>​ #2.方法二</p><p>​ netstat -apn|grep 端口号</p><h2 id="查询文件" tabindex="-1">查询文件 <a class="header-anchor" href="#查询文件" aria-label="Permalink to &quot;查询文件&quot;">​</a></h2><p>1，查找某个文件</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">find / -name php.ini </span></span>
<span class="line"><span style="color:#e1e4e8;">which openssl</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">find / -name php.ini </span></span>
<span class="line"><span style="color:#24292e;">which openssl</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>2, find -type f -name &#39;*.php&#39;|xargs grep &#39;GroupRecord&#39; 查找包含某字符的文件</p><p>3，du -sh /www 查询目录大小</p><p>4，2，du -sh * 查询目录下文件大小</p><p>5，du -s etc 查看文件夹目录总大小</p><p>6， du -h 查看文件夹目录下各文件大小</p><p>7， du -k | sort -rn 或 du -sh * | sort -rn目录文件按大小排序</p><ol start="8"><li><p>du -h --max-depth=1 |grep [TG] |sort -nr #倒序排</p></li><li><p>ls -a #查看所有文件（包含隐藏文件)</p></li><li><p>df -m #查看磁盘使用情况</p></li><li><p>pwd 查看当前路径</p></li><li><p>,查询某文件动态变化 tail -f sql.log</p></li></ol><h2 id="文件操作类" tabindex="-1"><a id="file"> 文件操作类</a> <a class="header-anchor" href="#文件操作类" aria-label="Permalink to &quot;&lt;a id=&quot;file&quot;&gt; 文件操作类&lt;/a&gt;&quot;">​</a></h2><p>\1. rm -rf /var/www/html #删除非空目录（慎用）</p><p>\2. mv tt.tar /var/www/abc/tt.tar 移动文件</p><p>\2. cp -r wordpress m9shop/wordpress 复制目录</p><p>\3. ,tar zxvf html23.tar.gz -C /var/www/html #解压缩</p><p>\4. tar zcvf aaa.tar.gz aaaa #打包压缩</p><p><code> tar -zcvf stpaulsfriends20180103.tar.gz --exclude=stpaulsfriends/public/image --exclude=stpaulsfriends/.git stpaulsfriends</code> <a href="/xn--wyu444i.xn--gitimage-1c2n567fur1d.html">//排除.git和image目录</a></p><p>\5. chmod -R 777 /root/funyparse #递归改变权限</p><p>\6. echo null &gt; nohub.out 清空内容</p><p>\7. source filename 或 . filename 执行刚修改的初始化文件，使之立即生效，而不必注销并重新登录。</p><p>\8. mkdir /home/mysql/logs 新增目录</p><p>\9. touch logs/slow_query_logs.txt 新增文件</p><p>10，scp -r /home/administrator/Desktop/old/driver/test/ <a href="mailto:root@192.168.62.10" target="_blank" rel="noreferrer">root@192.168.62.10</a>:/root/ 远程拷贝文件到192.168.62.10</p><p>\11. 上传 rz 下载sz //如果没有刚需要在线安装 yum -y install lrzsz</p><p>12, 获取文件前20行 <code>head -n 20 filename</code> 获取文件末尾20行 <code>tail -n 20 filename</code></p><p>\13. 替换文本 sed -i &#39;s/原字符串/新字符串/&#39; /home/1.txt</p><h2 id="需要启动的服务" tabindex="-1"><a id="start"> 需要启动的服务</a> <a class="header-anchor" href="#需要启动的服务" aria-label="Permalink to &quot;&lt;a id=&quot;start&quot;&gt; 需要启动的服务&lt;/a&gt;&quot;">​</a></h2><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">#!/bin/bash</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">systemctl start nginx</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">echo &quot;nginx runing&quot;</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">systemctl start httpd</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">echo &quot;httpd runing&quot;</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">redis-server /usr/local/etc/redis.conf</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">echo &quot;redis runing&quot;</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">service rabbitmq-server start</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">echo &quot;rabbitmq runing&quot;</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">pm2 start ./lib/index.js</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">echo &quot;RSSHub runing&quot;</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">#chkconfig rabbitmq-server on</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">#!/bin/bash</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">systemctl start nginx</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">echo &quot;nginx runing&quot;</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">systemctl start httpd</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">echo &quot;httpd runing&quot;</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">redis-server /usr/local/etc/redis.conf</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">echo &quot;redis runing&quot;</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">service rabbitmq-server start</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">echo &quot;rabbitmq runing&quot;</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">pm2 start ./lib/index.js</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">echo &quot;RSSHub runing&quot;</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">#chkconfig rabbitmq-server on</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br></div></div><h3 id="定时任务" tabindex="-1"><a id="crontab"> 定时任务</a> <a class="header-anchor" href="#定时任务" aria-label="Permalink to &quot;&lt;a id=&quot;crontab&quot;&gt; 定时任务&lt;/a&gt;&quot;">​</a></h3><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">*/30 * * * * php /var/www/simapi/public/product_jiaoyi.php &gt;/dev/null 2&gt;&amp;1 &amp;</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">9 9 * * * php /var/www/simapi/public/eth_jiaoyi.php &gt;/dev/null 2&gt;&amp;1 &amp;</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">10 12 * * * php /var/www/simapi/public/eth_jiaoyi.php &gt;/dev/null 2&gt;&amp;1 &amp;</span></span>
<span class="line"><span style="color:#e1e4e8;"></span></span>
<span class="line"><span style="color:#e1e4e8;">11 18 * * * php /var/www/simapi/public/eth_jiaoyi.php &gt;/dev/null 2&gt;&amp;1 &amp;</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">*/30 * * * * php /var/www/simapi/public/product_jiaoyi.php &gt;/dev/null 2&gt;&amp;1 &amp;</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">9 9 * * * php /var/www/simapi/public/eth_jiaoyi.php &gt;/dev/null 2&gt;&amp;1 &amp;</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">10 12 * * * php /var/www/simapi/public/eth_jiaoyi.php &gt;/dev/null 2&gt;&amp;1 &amp;</span></span>
<span class="line"><span style="color:#24292e;"></span></span>
<span class="line"><span style="color:#24292e;">11 18 * * * php /var/www/simapi/public/eth_jiaoyi.php &gt;/dev/null 2&gt;&amp;1 &amp;</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br></div></div><h3 id="rabbitmq-消费服务" tabindex="-1"><a id="nohup">rabbitmq 消费服务</a> <a class="header-anchor" href="#rabbitmq-消费服务" aria-label="Permalink to &quot;&lt;a id=&quot;nohup&quot;&gt;rabbitmq 消费服务&lt;/a&gt;&quot;">​</a></h3><div class="language-sh vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"></span>
<span class="line"><span style="color:#B392F0;">nohup</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">php</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">/var/www/simapi/public/custom_jiaoyi.php</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">&gt;</span><span style="color:#9ECBFF;">/dev/null</span><span style="color:#E1E4E8;"> &amp;</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"></span>
<span class="line"><span style="color:#6F42C1;">nohup</span><span style="color:#24292E;"> </span><span style="color:#032F62;">php</span><span style="color:#24292E;"> </span><span style="color:#032F62;">/var/www/simapi/public/custom_jiaoyi.php</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">&gt;</span><span style="color:#032F62;">/dev/null</span><span style="color:#24292E;"> &amp;</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div></div></div></main><footer class="VPDocFooter" data-v-6b87e69f data-v-ef5dee53><!--[--><!--]--><!----><nav class="prev-next" data-v-ef5dee53><div class="pager" data-v-ef5dee53><a class="pager-link prev" href="/tools/js%E7%9F%A5%E8%AF%86%E7%82%B9.html" data-v-ef5dee53><span class="desc" data-v-ef5dee53>Previous page</span><span class="title" data-v-ef5dee53>js知识点</span></a></div><div class="pager" data-v-ef5dee53><a class="pager-link next" href="/tools/linux%E5%9F%9F%E5%90%8D%E9%85%8D%E7%BD%AE%E5%8F%8A%E5%8F%8D%E5%90%91%E4%BB%A3%E7%90%86.html" data-v-ef5dee53><span class="desc" data-v-ef5dee53>Next page</span><span class="title" data-v-ef5dee53>linux域名配置及反向代理</span></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
    <script>window.__VP_HASH_MAP__=JSON.parse("{\"case_getaccesstoken.md\":\"67a16083\",\"case_前端日志.md\":\"270996e6\",\"case_前端防切屏.md\":\"6d67367b\",\"ai学习笔记_个人理解.md\":\"62e8b40f\",\"case_vue实例技巧.md\":\"75787181\",\"日志_关于企业站的seo.md\":\"496419f4\",\"case_插件使用配置.md\":\"fe83b1c1\",\"办公_版本处理方案.md\":\"e749eb0e\",\"办公_开发记录.md\":\"437c4662\",\"case_mac使用.md\":\"48c33f34\",\"办公_app开通微信支付.md\":\"95c825d6\",\"tools_arduino基础操作.md\":\"f997fb69\",\"日志_uniapp内存泄漏事件.md\":\"25a76630\",\"case_ios上架笔记.md\":\"84d52929\",\"case_开发富文本本编辑器.md\":\"d7842807\",\"办公_ebm后端及数据库笔记.md\":\"0c19b5f3\",\"case_uniapp踩坑记录.md\":\"4e47ad2a\",\"tools_conda命令  pip命令.md\":\"23ac8380\",\"办公_待解决问题.md\":\"dcc132f1\",\"case_优秀的开源vue组件.md\":\"6020f82e\",\"case_样式布局.md\":\"670153be\",\"tools_emmet web快速构建命令.md\":\"02ded381\",\"ai学习笔记_二、应用场景.md\":\"3985787b\",\"java笔记_程序基础.md\":\"750d7bf5\",\"日志_合格的文档.md\":\"e2dd10c4\",\"tools_index.md\":\"8efae136\",\"tools_设计规范.md\":\"c1e5222d\",\"case_转pdf相关.md\":\"9b047234\",\"case_vuex使用示例.md\":\"042f3339\",\"tools_elementui笔记.md\":\"d727814f\",\"办公_应用中心框架更新.md\":\"9124a7e9\",\"ai学习笔记_一、概念.md\":\"960b8e6d\",\"case_markdown文件转换目录列表.md\":\"f04a5805\",\"tools_cmd npm yarn pnpm命令.md\":\"deebc540\",\"case_css技巧.md\":\"cedd6cee\",\"ai学习笔记_四、模型.md\":\"f9d2ec81\",\"办公_代码示例_l律所起诉状.md\":\"f875bace\",\"tools_adb命令.md\":\"9831c553\",\"tools_命名汇总推荐.md\":\"3bf819e1\",\"办公_seo方案.md\":\"22a7e45f\",\"java笔记_面向对象编程.md\":\"486db2ad\",\"日志_测试笔记.md\":\"00dcc692\",\"case_python自动测试脚本.md\":\"bec8212a\",\"index.md\":\"25642d62\",\"tools_mac使用笔记.md\":\"9ee5b2a6\",\"办公_实施笔记.md\":\"10ecc800\",\"tools_vue笔记.md\":\"be570cd4\",\"ai学习笔记_五、模型发展.md\":\"a9feb551\",\"case_vue六种l传输方式.md\":\"cadce3ad\",\"case_index.md\":\"4370ee15\",\"ai学习笔记_六、开发.md\":\"0b1a367a\",\"tools_前端基础知识.md\":\"864e9786\",\"ai学习笔记_三、promt工程.md\":\"1b5a7f7c\",\"办公_todo.md\":\"2ccf3c97\",\"日志_前端自检项.md\":\"0544de55\",\"case_基础csss样式.md\":\"d368d629\",\"tools_react.md\":\"d032d22f\",\"case_数字化大屏问题点.md\":\"e37019d4\",\"tools_php基础及常用函数.md\":\"b2afeccf\",\"case_flutter安装配置.md\":\"ccbc694e\",\"tools_js知识点.md\":\"51436346\",\"case_富文本编辑器原理.md\":\"f3b0b2ee\",\"tools_mysql命令.md\":\"373a1b6c\",\"tools_linux命令.md\":\"82c20701\",\"办公_前端常用代码.md\":\"8923abd6\",\"tools_jquery的使用.md\":\"e9d67fbd\",\"tools_docker使用.md\":\"1ea0c513\",\"tools_uniapp笔记.md\":\"c0a178f5\",\"tools_git笔记.md\":\"9870fad6\",\"日志_自媒体笔记.md\":\"0d283ba7\",\"tools_linux域名配置及反向代理.md\":\"25492670\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"阿泽的笔记\",\"description\":\"做一个努力的码农\",\"base\":\"/\",\"head\":[],\"appearance\":true,\"themeConfig\":{\"displayAllHeaders\":true,\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"案例\",\"link\":\"/case/\"},{\"text\":\"工具\",\"link\":\"/tools/\"}],\"sidebar\":[{\"text\":\"工具\",\"collapsible\":true,\"collapsed\":true,\"items\":[{\"text\":\"adb命令\",\"link\":\"/tools/adb命令\"},{\"text\":\"arduino基础操作\",\"link\":\"/tools/arduino基础操作\"},{\"text\":\"cmd npm yarn pnpm命令\",\"link\":\"/tools/cmd npm yarn pnpm命令\"},{\"text\":\"elementUi笔记\",\"link\":\"/tools/elementUi笔记\"},{\"text\":\"Emmet Web快速构建命令\",\"link\":\"/tools/Emmet%20Web快速构建命令\"},{\"text\":\"git笔记\",\"link\":\"/tools/git笔记\"},{\"text\":\"js知识点\",\"link\":\"/tools/js知识点\"},{\"text\":\"linux命令\",\"link\":\"/tools/linux命令\"},{\"text\":\"linux域名配置及反向代理\",\"link\":\"/tools/linux域名配置及反向代理\"},{\"text\":\"mac使用笔记\",\"link\":\"/tools/mac使用笔记\"},{\"text\":\"mysql命令\",\"link\":\"/tools/mysql命令\"},{\"text\":\"php基础及常用函数\",\"link\":\"/tools/php基础及常用函数\"},{\"text\":\"react\",\"link\":\"/tools/react\"},{\"text\":\"uniapp笔记\",\"link\":\"/tools/uniapp笔记\"},{\"text\":\"vue笔记\",\"link\":\"/tools/vue笔记\"},{\"text\":\"前端基础知识\",\"link\":\"/tools/前端基础知识\"}]},{\"text\":\"案例\",\"collapsible\":true,\"collapsed\":true,\"items\":[{\"text\":\"css技巧\",\"link\":\"/case/css技巧\"},{\"text\":\"python自动测试脚本\",\"link\":\"/case/python自动测试脚本\"},{\"text\":\"uniapp踩坑记录\",\"link\":\"/case/uniapp踩坑记录\"},{\"text\":\"vuex使用示例\",\"link\":\"/case/vuex使用示例\"},{\"text\":\"vue六种l传输方式\",\"link\":\"/case/vue六种l传输方式\"},{\"text\":\"vue实例技巧\",\"link\":\"/case/vue实例技巧\"},{\"text\":\"优秀的开源vue组件\",\"link\":\"/case/优秀的开源vue组件\"},{\"text\":\"前端日志\",\"link\":\"/case/前端日志\"},{\"text\":\"开发富文本本编辑器\",\"link\":\"/case/开发富文本本编辑器\"},{\"text\":\"插件使用配置\",\"link\":\"/case/插件使用配置\"},{\"text\":\"样式布局\",\"link\":\"/case/样式布局\"},{\"text\":\"转pdf相关\",\"link\":\"/case/转pdf相关\"}]}]},\"locales\":{},\"scrollOffset\":90,\"cleanUrls\":false}");</script>
    
  </body>
</html>